package com.zhj.client;

import com.zhj.service.UserService;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

/**
 * @author zhj
 */
public class clientMain {

    public static void main(String[] args) throws RemoteException, NotBoundException, MalformedURLException {
        UserService userService = (UserService) Naming.lookup("rmi://localhost:8888/UserService");
        String msg = userService.sayHello("zhj ");
        System.out.println(msg);
    }

}
